package agu.misc;

import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import androidx.core.util.Consumer;

public class OnSeekBarChangeListener2 implements OnSeekBarChangeListener
{
    public SeekBar seekBar;
    public int progress;
    public boolean fromUser;

    Consumer<OnSeekBarChangeListener2> consumer;

    public OnSeekBarChangeListener2(Consumer<OnSeekBarChangeListener2> consumer){
        this.consumer = consumer;
    }

    @Override
    public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser){
        this.seekBar = seekBar;
        this.progress = progress;
        this.fromUser = fromUser;
        if(consumer != null) consumer.accept(this);
    }

    @Override
    public void onStartTrackingTouch(SeekBar seekBar){
    }

    @Override
    public void onStopTrackingTouch(SeekBar seekBar){
    }
}
